@extends('admin.public.admin');
@section('main')
<div class="mws-panel grid_8">
                    <div class="mws-panel-header">
                        <span><i class="icon-ok"></i> 添加广告 </span>
                    </div>
                    <div class="mws-panel-body no-padding">
                        <form id="mws-validate" enctype="multipart/form-data" method="post" class="mws-form" action="/admin/sys/typeads/{{$list['id']}}" novalidate="novalidate">
                        {{csrf_field()}}
                        <input type="hidden" name="_method" value="PUT" />
                            <div id="mws-validate-error" class="mws-form-message error" style="display:none;"></div>
                            <div class="mws-form-inline">
                                 <div class="mws-form-row">
                                    <label class="mws-form-label">选择分类</label>
                                 <div class="mws-form-item">
                                        <select class="required large" name="tid">

                                        <option value="{{$tid}}">{{$tname}}</option>

                                        </select>
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label class="mws-form-label">广告标题</label>
                                    <div class="mws-form-item">
                                        <input type="text" name="title" value="{{$list['title']}}" class="required large">
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label class="mws-form-label">广告链接</label>
                                    <div class="mws-form-item">
                                        <input type="text" name="href" value="{{$list['href']}}" class="required email large">
                                    </div>
                                </div>
                                  <div class="mws-form-row">
                                    <label class="mws-form-label">是否大图</label>
                                <ul class="mws-form-list">
                                            <li><input type="radio" @if($list['type']==0) checked @endif value="0" name="type"> <label>小图</label></li>
                                            <li><input type="radio" @if($list['type']==1) checked @endif value="1" name="type"> <label>大图</label></li>
                                        </ul>
                                        </div>
                                </div>
                                <div class="mws-form-row">
                                    <label class="mws-form-label">广告排序</label>
                                    <div class="mws-form-item">
                                        <input type="number" name="sort" value="{{$list['sort']}}"  class="required url large">
                                    </div>
                                </div>
                                    <div class="mws-form-row">
                                    <label class="mws-form-label">添加图片</label>
                                    <div class="mws-form-item">
                                        <div class="fileinput-holder" style="position: relative;">
                                                <img width="100" height="50" src="{{$list['img']}}" alt="" />
                                                <span class="fileinput-btn btn" type="button" style="display:block; overflow: hidden; position: absolute; top: 0; right: 0; cursor: pointer;">Browse...
                                                <input type="file" name="img" class="required" style="position: absolute; top: 0px; right: 0px; margin: 0px; cursor: pointer; font-size: 999px; opacity: 0; z-index: 999;">
                                                </span></div>
                                        <label for="picture" class="error" generated="true" style="display:none"></label>
                                    </div>
                                </div>
                            <div class="mws-button-row">
                                <input type="submit" value="提交1" class="btn btn-danger">
                            </div>
                        </form>
                    </div>
                </div>
@endsection